package com.xiangyi.teachingsystem.entity.po;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.xiangyi.teachingsystem.validation.groups.TaskInfo;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.NotNull;
import java.sql.Timestamp;

@Data
@AllArgsConstructor
@NoArgsConstructor
@JsonInclude(JsonInclude.Include.NON_NULL)
public class Task {
    //自增id
    @TableId(value = "id",type = IdType.AUTO)
    @NotNull(message = "id不能为空",groups = {TaskInfo.class})
    private Integer id;
    //课程标识
    @NotNull(message = "coursedId不能为空")
    private Integer courseId;
    //任务名称
    @NotNull(message = "taskName不能为空")
    private String taskName;
    //任务描述
    @NotNull(message = "taskDesc不能为空")
    private String taskDesc;
    //任务截止日期
    @NotNull(message = "deadline不能为空")
    private Timestamp deadline;

}
